let name = "奉先";
let age = 35;
let sex = "男";

// 传统ES5
let obj1 = {
    name: name,
    age: age,
    sex: sex,
};

// ES6中属性名和属性值一样时可以简写
let obj2 = {
    name,
    age,
    sex,
};